//
//  SubjectViewController.m
//  MyLittleBrother
//
//  Created by speeda on 17/7/30.
//  Copyright © 2017年 speeda. All rights reserved.
//

#import "SubjectViewController.h"

@interface SubjectViewController ()<UITableViewDataSource,UITableViewDelegate>

@property (weak, nonatomic) IBOutlet UITableView *subjectTableView;
@property (nonatomic, strong) NSMutableArray *subjectArray;

@end

@implementation SubjectViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self initView];
    
}

- (void)initView {

    self.subjectTableView.dataSource = self;
    self.subjectTableView.delegate = self;
    self.subjectTableView.tableFooterView = [[UIView alloc] init];
    
}




#pragma mark -- UITableViewDataSource,UITableViewDelegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return self.subjectArray.count;
}



- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    static NSString *personalCell = @"personalCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:personalCell];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:0 reuseIdentifier:personalCell];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    
    cell.textLabel.text = self.subjectArray[indexPath.row];
    
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    
}

- (NSMutableArray *)subjectArray {
    
    if (!_subjectArray) {
        _subjectArray = [NSMutableArray arrayWithObjects:@"#出气筒",@"#小哥正能量",@"#集市",@"#随手拍",@"#招聘启事", nil];
    }
    
    return _subjectArray;
}

@end
